package com.bigdata.controller;

import com.bigdata.entity.pojo.Result;
import com.bigdata.service.SigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author  王铭轩
 *  控制器：负责  信号覆盖  相关业务处理（7 ~ 9）
 */
@RestController
@RequestMapping("/signal")
public class SignalCoverageController {

    @Autowired
    SigService sigService;

    /**
     * 7：获取信号强度分布图
     * @return
     */
    @GetMapping("/distribution")
    public Result<Object> getSigStrengthDistribution(){
        return Result.success(this.sigService.getSigStrengthDistribution());
    }

    /**
     * 8：获取典型地标信号强度跟踪
     * @return
     */
    @GetMapping("/track")
    public Result<Object> getSigTypicalLandMarkStrengthTracking(){
        return Result.success(this.sigService.getSigTypicalLandMarkStrengthTracking());
    }

    /**
     * 9：获取典型地标信号强度统计
     * @return
     */
    @GetMapping("/statistics")
    public Result<Object> getSigTypicalLandMarkStrengthStatistic(){
        return Result.success(this.sigService.getSigTypicalLandMarkStrengthStatistic());
    }

}
